#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int  main()
{
    int a[101][101];
    int n, i, j;
    int sum = 0;
    while (scanf("%d", &n) != EOF)
    {
        for (i = 0; i < n; i++)
            for (j = 0; j < n; j++)
                scanf("%d", &a[i][j]);
        for (i = 0; i < n; i++)
            for (j = 0; j < n; j++)
            {
                if (a[i][j] % 2 != 0)
                    sum += a[i][j];
            }
        printf("%d\n", sum);
    }


    return 0;
}